package com.example.administrator.myapplication;

import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.example.administrator.myapplication.base.BaseActivity;

public class MainActivity extends BaseActivity implements AdapterView.OnItemClickListener{
    private ListView mListView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mListView = (ListView) findViewById(R.id.lv_menu);
        mListView.setOnItemClickListener(this);

    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        switch (position) {
            case 0:
                //一些简单的Adapter
//                startActivity(FirstActivity.class);
                break;
            case 1:
                //ListActivity
//                startActivity(ListDemoActivity.class);
                break;
            case 2:
                //单选，多选ListView
                startActivity(ChooseActivity.class);
                break;
            case 3:
                //自定义的Adapter，简单优化
                // startActivity(SecondActivity.class);
                break;
            case 4:
                //快速滑动优化
                // startActivity(QuickListViewActivity.class);
                break;
            case 5:
                break;
        }
    }
}
